package file;

import java.io.*;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name = "苍老师";
        int age = 18;
        String gender = "女";
        String[] otherInfo = {"是个演员","长得漂亮","身材好","会说日语"};

        Person p = new Person(name, age, gender, otherInfo);
        FileOutputStream fos = new FileOutputStream("fos.obj");
        ObjectOutputStream ob = new ObjectOutputStream(fos);
        ob.writeObject(p);
        System.out.println("写入完毕");
        ob.close();
    }
}
